/*k-Factorization
Given a positive integer n, find k integers (not necessary distinct) such that all these integers are strictly greater than 1, and their product is equal to n.
Input
The first line contains two integers n and k (2 ≤ n ≤ 100000, 1 ≤ k ≤ 20).
Output
If it's impossible to find the representation of n as a product of k numbers, print -1.
Otherwise, print k integers in any order. Their product must be equal to n. If there are multiple answers, print any of them.

Example
Input
100000 2
Output
2 50000
Input
100000 20
Output
-1
Input
1024 5
Output
2 64 2 2 2
思路：把n分解为m个因子相乘，如果不能分为n个因子，则输出-1，可以的话，输出所有因子组成的任意一种顺序即可
*/
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <vector>
#include <map>
using namespace std;
int n, m, num;
int main()
{
    while (cin >> n >> m)
    {
        int nn = n;
        vector<int> v;
        num = 0;
        int k = 2;
        while (true)
        {
            if (n == 1)
                break;
            if (num == m - 1)
            {

                num ++;
                v.push_back(n);
                break;
            }
            if (k > nn / 2)
                break;
            if (n % k == 0)
            {
                v.push_back(k);
                num ++;
                n /= k;
            }
            else
                k ++;
        }
        if (num < m)
            cout << "-1" << endl;
        else
        {
            for (int i = 0; i < v.size(); i ++)
                cout << v[i] << " ";
            cout << endl;
        }
    }
    return 0;
}
